varying vec3 normal, lightDir, vposEye, texCoord0;
uniform sampler2D diffuseMap;

void main()
{
	vec3 h = normalize(vposEye + lightDir);
	vec3 n = normalize(normal);

	float d = max(dot(lightDir,n),0.0); 
	float s = pow(max(dot(h, n), 0.0), 200.0); 
	
	vec3 texCol = texture2D(diffuseMap, texCoord0.xy).rgb;
	
	vec3 c = 0.5 * d * texCol + 0.7 * s;	

	gl_FragColor = vec4(c, 1);
}
